package com.igroupes.ovineherd.enums;

import org.springframework.web.bind.annotation.RequestMethod;

public enum ModelApiEnum implements CodeEnum<Integer> {
    POST_DATA(1,RequestMethod.POST,"/model/data/api/model/${modelid}"),
    GET_ONE(2,RequestMethod.GET,"/model/data/api/model/${modelid}/${id}"),
    GET_LIST(3,RequestMethod.GET,"/model/data/api/model/${modelid}"),
    PUT_DATA(4,RequestMethod.PUT,"/model/data/api/model/${modelid}/${id}"),
    DELETE_DATA(45,RequestMethod.DELETE,"/model/data/api/model/${modelid}/${id}"),
    ;
    private Integer code;
    private RequestMethod requestMethod;
    private String url;

    ModelApiEnum(Integer code, RequestMethod requestMethod, String url) {
        this.code = code;
        this.requestMethod = requestMethod;
        this.url = url;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public RequestMethod getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(RequestMethod requestMethod) {
        this.requestMethod = requestMethod;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
